home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / BitmapPainter / BitmapPainter.jar / Intro.class (.txt) next >
Encoding:
Java Class File  |  2001-11-01  |  3.5 KB  |  59 lines

  1. import javax.microedition.lcdui.Alert;
  2. import javax.microedition.lcdui.AlertType;
  3. import javax.microedition.lcdui.Command;
  4. import javax.microedition.lcdui.CommandListener;
  5. import javax.microedition.lcdui.Displayable;
  6. import javax.microedition.lcdui.Form;
  7. import javax.microedition.lcdui.Image;
  8. import javax.microedition.lcdui.StringItem;
  9.  
  10. public class Intro extends Form implements CommandListener {
  11.    private Painter midlet;
  12.    private Command newCommand;
  13.    private Command loadCommand;
  14.    private Command helpCommand;
  15.    private Command exitCommand;
  16.  
  17.    public Intro(Painter var1) {
  18.       super("Bitmap Painter");
  19.       this.midlet = var1;
  20.       ((Form)this).append(Painter.intro);
  21.       StringItem var2 = new StringItem((String)null, "(c)2001, S.A.D. Gmbh\n\nDeveloped by Cocoasoft");
  22.       ((Form)this).append(var2);
  23.       this.newCommand = new Command("New", 1, 1);
  24.       this.loadCommand = new Command("Load", 1, 2);
  25.       this.helpCommand = new Command("Help", 1, 3);
  26.       this.exitCommand = new Command("Exit", 1, 4);
  27.       ((Displayable)this).addCommand(this.newCommand);
  28.       ((Displayable)this).addCommand(this.loadCommand);
  29.       ((Displayable)this).addCommand(this.helpCommand);
  30.       ((Displayable)this).addCommand(this.exitCommand);
  31.       ((Displayable)this).setCommandListener(this);
  32.    }
  33.  
  34.    public void commandAction(Command var1, Displayable var2) {
  35.       if (var1.equals(this.newCommand)) {
  36.          PainterCanvas var3 = new PainterCanvas(this.midlet, this, (String)null);
  37.          this.midlet.display.setCurrent(var3);
  38.       } else if (var1.equals(this.loadCommand)) {
  39.          LoadForm var6 = new LoadForm(this.midlet, this);
  40.          this.midlet.display.setCurrent(var6);
  41.       } else if (var1.equals(this.helpCommand)) {
  42.          StringBuffer var7 = new StringBuffer();
  43.          String var4 = System.getProperty("microedition.locale");
  44.          if (var4 != null && var4.startsWith("de")) {
  45.             var7.append("Mit der Navigationstaste k├╢nnen Sie das Fadenkreuz ├╝ber den Bildschirm bewegen. Die Logogr├╢├ƒe betr├ñgt 96x46 Pixel. Mit der gr├╝nen Taste k├╢nnen Sie ein Pixel setzen, mit der roten Taste wieder l├╢schen. Unter Save k├╢nnen Sie das Logo speichern, und unter Preview wird Ihnen das komplette Logo 1:1 angezeigt. Mit Finish k├╢nnen Sie das Programm beenden. Vergessen Sie aber nicht vorher das Bild zu speichern.");
  46.          } else {
  47.             var7.append("INTRO SCREEN:\nNew ... It opens drawing screen with empty image.\nLoad ... It opens drawing screen with an old image.\nHelp ... It shows this help screen.\nExit ... It exits the application.\n\nDRAWING SCREEN:\nUse cursor keys to move around. Image size is fixed to 96 x 46 pixels. Use select key to set/unset the pixel.\nSave ... It saves the current image under specified name.\nPreview ... It shows the current image in 1:1 zoom (normal size).\nFinish ... It returns to intro screen. Don't forget to save it first!");
  48.          }
  49.  
  50.          Alert var5 = new Alert("Help", var7.toString(), (Image)null, (AlertType)null);
  51.          var5.setTimeout(-2);
  52.          this.midlet.display.setCurrent(var5, this);
  53.       } else if (var1.equals(this.exitCommand)) {
  54.          this.midlet.exit();
  55.       }
  56.  
  57.    }
  58. }
  59.